﻿@using CoralNode.Core.Entity.Enums
@using CoralNode.MvcClient.Helper
@using Coralcode.Utils.Basic
@model CoralNode.Core.Entity.Domains.Node.NodeDomain
@{
    Layout = null;
}
<link rel="stylesheet" type="text/css" href="/Themes/CoralAdmin/_misc/css/screen.css">
<link rel="stylesheet" type="text/css" href="/Themes/CoralAdmin/_misc/css/main.css">
        <link rel="stylesheet" type="text/css" href="/Themes/CoralAdmin/_misc/scripts/jqueryUI/css/jquery-ui-timepicker-addon.css">
<script src="/Themes/CoralAdmin/_misc/scripts/jquery-1.7.2.min.js"></script>
<script src="/Themes/CoralAdmin/_misc/scripts/jqueryUI/jquery-ui-1.10.3.custom.min.js"></script>
    <script src="/Themes/CoralAdmin/_misc/scripts/jqueryUI/jquery-ui-timepicker-addon.js"></script>
<div class="pbody_top">
    <span class="ico ico_setting_system"></span><span class="t t_c">@(Model.Title)
    </span>
</div>
<div class="content_tab extra_normal" style="border-top: 1px solid #a9afb4;">
    <div class="tablist extra_normal" data-js="tab">
        <a href="#">未关联</a>
        <a href="#">已关联</a>
    </div>
</div>
<div class="js_tabcnt js_autoheight" style="overflow-y: auto; overflow-x: hidden;">
    <div class="">
        <iframe id="nodeRelation" src="/m/node/nodeRelation/@Model.Id"></iframe>
    </div>
    <div class="selected">
        <div>
            <div class="tablelist_style1 js-relation" data-js="tabellist_style1">
                <table cellpadding="0" cellspacing="0">
                    <tr class="exclude">
                        <th width="60">选择</th>
                        <th width="100" align="left">ID</th>
                        <th align="left">名称</th>
                        <th width="140">操作</th>
                    </tr>
                    @foreach (var item in ViewBag.RelNodeList)
                    {
                        <tr>
                            <td>
                                <label class="checkbox_own">
                                    <input type="checkbox" value="@item.Id"/></label></td>
                            <td class="td_left">@item.Id</td>
                            <td class="td_left"><a target="_blank" href="/m/node/editNode/@item.Id">@item.Title</a>
                            </td>
                            <td>
                                <div class="fun">
                                    <a href="/m/node/delRelation" itemid="@item.Id" class="js-delRel">删除关联</a>
                                </div>
                            </td>
                        </tr>
                    }

                </table>
                <div class="global_fun ">
                    <label class="checkbox_own gloabal_select">
                        <input type="checkbox" /></label>
                    <input type="button" class="btn_4 btn invert" value="反选" /><input type="button" class="btn_4 btn reset"
                        value="重置" />
                    <a href="/m/node/BatchDelRelation" class="js_batchDelRel">删除关联</a>
                </div>
            </div>
        </div>
    </div>

</div>
<script src="/Themes/CoralAdmin/_misc/scripts/jquery.plugin.js"></script>
<script src="/Themes/CoralAdmin/_misc/scripts/jquery.app.js"></script>
<script src="/Themes/CoralAdmin/_misc/scripts/nodeRelation.js"></script>
<script>
    $(function () {
        var js = $('[data-js]');
        js.filter('[data-js="tab"]').tabs(".js_tabcnt > div");
        autoHeight();
        function autoHeight() {
            $(".js_autoheight").height($(".js_autoheight").parents("#overlay").height() - 100);
        }
    })
</script>


